#ifndef __DRV_H__
#define __DRV_H__

#ifndef KERNEL_VERSION
#define KERNEL_VERSION(a,b,c) ((a)*65536+(b)*256+(c))
#endif

struct wh_dev {
  struct cdev *my_cdev;
  ///Data segment associated to the device
  char *data;
  ///Size of the data segment
  unsigned long size;
  ///Circular buffer behavior [1=new data overwrite old, 0=new data overwriting old is delated]
  unsigned int ODoW;
  ///Offset of the data segment from where to start reading.
  unsigned int rd_offset;
  ///Offset of the data segment from where to start writing.
  unsigned int rw_offset;
};

int wh_drv_reg(unsigned int st, unsigned int buffSz, unsigned int ODoW);
void wh_drv_unreg(void);

#endif
